@use "../../variables.scss";

.ConfigArea--wrapper {
  width: 100%;
  max-width: 1024px;
  min-width: 700px;
  padding-top: 20px;
}

.ConfigError--wrapper {
  width: 80%;
  max-width: 783px;
  flex: none;
}

.link,
a:visited {
  color: var(--link-color);
  cursor: pointer;
  font-weight: 500;
  text-decoration: underline;
}

.ConfigInfo {
  display: flex;
  align-items: center;
  font-size: 14px;
  line-height: 22px;
  border-radius: 4px;
  padding: 13px 40px 10px;

  &.newer {
    background: variables.$primary-light-color;
    color: variables.$text-color-body-copy;
  }

  &.older {
    background: var(--warning-color-light);
    color: var(--warning-color);
  }

  &.current {
    background: var(--success-color-light);
    color: var(--success-color);
  }
}
.config-sidebar-wrapper {
  background: variables.$sub-nav-color;
  width: 250px;
  height: fit-content;
  padding: 10px;
  top: 60px;
  position: sticky;
  max-height: calc(100vh - 190px);
  border-radius: 4px;
  overflow: auto;
  .has-error {
    color: var(--error-color);
  }

  & .side-nav-group {
    .icon.u-darkDropdownArrow,
    .arrow-down {
      margin-left: 6px;
      top: 6px;
      transition: transform 0.1s ease-in-out;
    }
    &.group-title {
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      color: variables.$text-color-secondary;
      &:hover {
        color: variables.$text-color-primary;
      }
    }

    &.group-open {
      .icon.u-darkDropdownArrow,
      .arrow-down {
        transform: rotate(180deg);
      }
      & .side-nav-items {
        display: block;
      }
    }
    &.is-active {
      & .group-title {
        font-weight: 700;
        color: variables.$text-color-primary;
      }
    }
  }
}
.side-nav-items {
  display: none;
  padding-left: 15px;
  a {
    display: block;
    margin-top: 10px;
    margin-bottom: 10px;
    color: variables.$sub-nav-text-color;
    cursor: pointer;
    font-weight: 400;
    word-break: break-word;

    &.active-item {
      font-weight: 500;
      color: variables.$text-color-secondary;
      &.has-error {
        color: var(--error-color);
      }
    }

    &:hover {
      color: variables.$text-color-secondary;

      &:last-child {
        margin-bottom: 0;
      }
    }
  }
}
.config-items {
  padding: 10px;
  border-radius: 4px;
  margin-top: 15px;
  grid-template-columns: 1fr 1fr;
  grid-gap: 15px 0;
}

@media screen and (max-width: 1200px) {
  .config-sidebar-wrapper {
    width: 100%;
    max-width: 200px;
  }
}
